﻿function Setcurrent() {
    var urlCurrent = window.location.href;
    var currentPage = urlCurrent.substring(urlCurrent.lastIndexOf("/") + 1);
    var pagename;
    if (currentPage.indexOf(".") > 0) {
        pagename = currentPage.split(".")[0];
    }
    SetActiveTopLink();
}

function SetActiveTopLink() {
    jQuery("#top_links ul li a").removeClass("active");
    var urlCurrent = window.location.pathname;
    var count = 0;
    jQuery("#top_links ul li").each(function () {
        var item = jQuery("#top_links ul li:eq(" + count + ") a").attr("href");
        count++;
        if (urlCurrent == item) {
            jQuery("#top_links ul li").eq((count - 1)).find("a").addClass("active");
            return;
        }
    });
}
function SetActivemenubar(itemIndex) {
    jQuery("#nav ul li a").removeClass("active");
    jQuery("#nav ul li").eq(itemIndex - 1).find("a").addClass("active");
}
function refreshImage() {
    jQuery.ajax({
        type: 'POST',
        url: "../captcha/Captcha.ashx",
        success: function () {
            jQuery("#imgCaptcha").attr("src", "../captcha/Captcha.ashx");
        }
    });
}

function changeInfo(element) {
    
}